#include "actionGenerator.h"

std::vector<Action>* actionUniformGenerator::generate(const int &n) {
    double step_v = (max_speed - min_speed) / ((double) n);
    double step_theta = (max_turn_rate - min_turn_rate) / ((double) n);
    double v = min_speed;
    std::vector<Action>* vector = new std::vector<Action>;
    for (int i = 0; i < n; i++) {        
        double theta = min_turn_rate;
        for (int j = 0; j < n; j++) {
            Action action(v, theta);
            vector->push_back(action);
            theta += step_theta;
        }        
        v += step_v;
    }
    return vector;
}
